<template>
  <el-dialog
    :title="$t('提示')"
    :visible.sync="showPwdDialog"
    :before-close="handleClose"
    width="30%"
    class="my-dialog__wrapper shimin-dialog-wrap"
  >
    <div class="shimin-dialog-content">
      <img src="../../../assets/img/shimin.png" alt="" />
      <p>{{ $t('账号未实名,不能申请推广者/专家') }}</p>
    </div>
    <span slot="footer" class="dialog-footer">
      <el-button @click="showPwdDialog = false">{{ $t('取 消') }}</el-button>
      <el-button type="primary" @click="goToApply">{{
        $t('去认证')
      }}</el-button>
    </span>
  </el-dialog>
</template>
<script>
export default {
  data() {
    return {
      showPwdDialog: false,
    }
  },

  methods: {
    goToApply() {
      this.showPwdDialog = false
      this.$emit('goToApply')
    },
    handleClose(done) {
      this.$confirm(this.$t('确认关闭？'))
        .then((_) => {
          done()
        })
        .catch((_) => {})
    },
    show() {
      this.showPwdDialog = true
    },
  },
}
</script>
<style lang="scss" scoped>
.shimin-dialog-content {
  padding: 1rem 0;
  text-align: center;
  img {
    width: 5.28rem;
    height: 5.28rem;
  }
  p {
    font-weight: bold;
    font-size: 1rem;
    color: #394350;
  }
}
</style>
